\begin{tikzpicture}
  [background rectangle/.style={fill=blue!10},
  framed]
  \node [draw=red,fill=white] at (0,0) {\textcolor{blue}{主控程序}};
  \node [rounded corners,draw] at (4,0) (start) {开始};
  \node at (8,0) {};
  \node [draw] at ([yshift=-2em]start.south) (preproc) {预处理};
  \node [draw] at ([yshift=-2em]preproc.south) (get_next_bb) {取下一个\textcolor{red}{基本块}};
  \node [draw,shape=diamond,aspect=3] at ([yshift=-2.5em]get_next_bb.south) (got) {取到了};
  \node [draw] at ([xshift=4em]got.east) (end_proc) {结束处理};
  \node [draw,rounded corners] at ([yshift=-2em]end_proc.south) (end) {结束};
  \node [draw] at ([yshift=-2em]got.south) (gen_var_act_info) {变量\textcolor{red}{活跃信息}生成};
  \node [draw] at ([yshift=-2em]gen_var_act_info.south) (get_next_quat) {取下一\textcolor{red}{四元式：q}};
  \node [draw] at ([yshift=-2em]get_next_quat.south) (write_des_code) {编写 \textcolor{blue}{目标指令}};
  \node [draw,shape=diamond,aspect=4] at ([yshift=-2.5em]write_des_code.south) (exit_for_bb) {基本块\textcolor{red}{出口}};
  \node [draw] at ([xshift=-10em,yshift=-1em]got.south) (rel_reg) {释放寄存器};
  \draw [-Latex] (start) -- (preproc);
  \draw [-Latex] (preproc) -- (get_next_bb);
  \draw [-Latex] (get_next_bb) -- (got);
  \draw [-Latex] (got) -- (gen_var_act_info) node[midway,right] {y};
  \draw [-Latex] (gen_var_act_info) -- (get_next_quat);
  \draw [-Latex] (get_next_quat) -- (write_des_code);
  \draw [-Latex] (write_des_code) -- (exit_for_bb);
  \draw [-Latex] (exit_for_bb) -- (rel_reg |- exit_for_bb) node[midway,above] {y} -- (rel_reg);
  \draw [-Latex] (rel_reg) -- ([yshift=-.5em]rel_reg|-preproc.south) -- ([yshift=-.5em]preproc.south);
  \draw [-Latex] (exit_for_bb.south) -- ([yshift=-.8em]exit_for_bb.south) node [midway,right] {n} -- ([yshift=-.8em]end|-exit_for_bb.south) -- ([yshift=-.5em]end|-gen_var_act_info.south) -- ([yshift=-.5em]gen_var_act_info.south);
  \draw [-Latex] (got) -- (end_proc) node [midway,above] {n};
  \draw [-Latex] (end_proc) -- (end);
  \node [draw=black, rectangle callout, fill=yellow!20, callout absolute pointer={([yshift=-.4em]preproc.east)},text width=4em, rounded corners] at ([xshift=5em]preproc.east) {包括划分基本块};
\end{tikzpicture}